<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>我的私信</title>
	<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport"/>
	<meta content="yes" name="apple-mobile-web-app-capable"/>
	<meta content="black" name="apple-mobile-web-app-status-bar-style"/>
	<meta content="telephone=no" name="format-detection"/>
	<script src="/js/plugins/jquery/jquery.min.js"></script>
	<script src="/js/plugins/bootstrap-4.1.1-dist/js/bootstrap.min.js"></script>
	<link rel="stylesheet" href="/js/plugins/bootstrap-4.1.1-dist/css/bootstrap.min.css">
	<script src="/js/plugins/jrender/jrender.min.js"></script>
	<script src="/js/plugins/dialog2/dialog.min.js"></script>
	<link rel="stylesheet" href="/js/plugins/dialog2/dialog.css">
	<link rel="stylesheet" href="/css/reset.css"/>
	<link rel="stylesheet" href="/css/style.css"/>
	<script>
        $(function () {
            var user = JSON.parse(sessionStorage.getItem("user"));
            var userId = user.id;
            $.get('/wish/' + userId, function (data) {
                console.log(data);
                $(".aui-scrollView").renderValues(data,{
                    getHref:function (item,value) {
                        console.log(data.list);
                        sessionStorage.setItem("wish",JSON.stringify(data.list));
                        var href = $(item).data("href");
                       $(item).attr("href",href+value);
                    }
                });
            });
        })
	</script>
</head>
<body>

<section class="aui-flexView">
	<header class="aui-navBar aui-navBar-fixed">
		<a href="/mine/profiles.html" class="aui-navBar-item">
			<i class="icon icon-return"></i>
		</a>
		<div class="aui-center">
			<span class="aui-center-title">我的心愿</span>
		</div>
		<a href="/mine/wish.html" class="aui-navBar-item">
			<i class="aui-center-title">新增</i>
		</a>
	</header>
	<section class="aui-scrollView">
		<div class="aui-news-box" render-loop="list">
			<a data-href="/mine/wish.html?id="  render-key="list.id" render-fun="getHref" class="aui-news-item">
				<div class="aui-news-item-bd">
					<h4 render-html="list.title"></h4>
					<p render-html="list.content"></p>
				</div>
				<div>
					<p>许愿时间:</p>
					<span class="aui-news-item-fr" render-html="list.relTime"></span>
				</div>

			</a>
		</div>
	</section>
</section>
</body>
</html>
